import React,{Component} from 'react'
import './dialog.less'
class Dialog extends Component{
  dialogHanlder(action){
//action
    this.props.dialogHanlder(action)
  }
    render(){
      return (
        <div className="DialogAlert">
          <div className="DialogAlertBody">
            <div className="DialogAlertHeader">
                <span className="DialogAlertTitle">{this.props.title}</span>
                <span className="DialogAlertCloseBtn" onClick={this.dialogHanlder.bind(this,"close")}>&times;</span>
            </div>
            <div className="DialogAlertContent">
              {this.props.content}
            </div>
            <div className="DialogAlertBottom">
                <span onClick={this.dialogHanlder.bind(this,"ok")}>确认</span>
                <span onClick={this.dialogHanlder.bind(this,"close")}>取消</span>
            </div>
          </div>
        </div>
      )
    }
}
export default Dialog
